﻿CREATE TABLE [dbo].[mark_Share_Text] (
    [ShareTextId] BIGINT        IDENTITY (1, 1) NOT NULL,
    [ShareId]     NVARCHAR (64) NOT NULL,
    [TextId]      BIGINT        NULL,
    [NoteId]      BIGINT        NULL,
    CONSTRAINT [PK_mark_Share_Text] PRIMARY KEY CLUSTERED ([ShareTextId] ASC),
    CONSTRAINT [FK_mark_Share_Text_mark_Note] FOREIGN KEY ([NoteId]) REFERENCES [dbo].[mark_Note] ([NoteId]),
    CONSTRAINT [FK_mark_Share_Text_mark_Share] FOREIGN KEY ([ShareId]) REFERENCES [dbo].[mark_Share] ([ShareId]),
    CONSTRAINT [FK_mark_Share_Text_text_Text] FOREIGN KEY ([TextId]) REFERENCES [dbo].[text_Text] ([TextId])
);

